//
//  ImagePickerController.m
//  BSProject
//
//  Created by nsm on 2019/11/20.
//  Copyright © 2019 beisheng. All rights reserved.
//

#import "ImagePickerController.h"
#import "NSMAssetPickerController.h"

@interface ImagePickerController ()

@end

@implementation ImagePickerController

#pragma mark - lifeCycle

#pragma mark - override

#pragma mark - initialization
- (void)viewDidLoad {
    [super viewDidLoad];
    
    NSMButton *btn = NSMButton.new;
    btn.backgroundColor = UIColor.redColor;
    btn.size = CGSizeMake(100, 44);
    btn.center = CGSizeCenter(kScreenSize);
    btn.backgroundColor = RandomColor();
    [btn addTarget:self action:@selector(imagePick) forControlEvents:UIControlEventTouchUpInside];
    btn.title = @"图片选择";
    [self.view addSubview:btn];
}

#pragma mark - setter/getter

#pragma mark - network

#pragma mark - method/public

#pragma mark - method/private

#pragma mark - action
- (void)imagePick {
    NSMAssetPickerController *vc = NSMAssetPickerController.new;
    vc.sourceType = NSMAssetSourceTypeAll;
    [self.navigationController pushViewController:vc animated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}

@end
